//
//  TiCaiCell.m
//  jingdongfang
//
//  Created by 郝志宇 on 16/7/8.
//  Copyright © 2016年 XuDong Jin. All rights reserved.
//

#import "TiCaiCell.h"

@interface TiCaiCell ()

@end

@implementation TiCaiCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self)
    {
        self.textLabel = [[UILabel alloc] initWithFrame:CGRectZero];
        _textLabel.font = [UIFont systemFontOfSize:13];
        _textLabel.layer.cornerRadius = 15;
        _textLabel.layer.masksToBounds = YES;
        _textLabel.textAlignment = NSTextAlignmentCenter;
        [self.contentView addSubview:_textLabel];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
//    ThemeList *t = self.data;
    
    _textLabel.frame = CGRectMake(0, 0, self.contentView.width, self.contentView.height);
//    textLabel.text = t.title.length > 0 ? t.title : @"";
    if (self.sel)
    {
        _textLabel.backgroundColor = [UIColor appColor];
        _textLabel.textColor = [UIColor whiteColor];
    }
    else
    {
        _textLabel.backgroundColor = [UIColor c6Color];
        _textLabel.textColor = [UIColor blackColor];
    }
}

@end
